From 7af0cf8927ab158daed39180f4783f1ed248d33e Mon Sep 17 00:00:00 2001 From: "kfraser@dhcp93.uk.xensource.com" Date: Mon, 19 Jun 2006 17:26:54 +0100 Subject: [PATCH] [XEN][PAE] Always enable non-debug version of l3tab_needs_shadow() as there is some suspicion that it leads to crashes on PAE hosts. Also: improve bracketing in the macros, for safety. Signed-off-by: Keir Fraser --- xen/arch/x86/mm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 8eac137d4a..1d5ffdb44b 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -268,9 +268,9 @@ void share_xen_page_with_privileged_guests( #if defined(CONFIG_X86_PAE) -#ifdef NDEBUG +#if 1 /*def NDEBUG*/ /* KAF: Non-debug case is suspect: let's always use it. */ /* Only PDPTs above 4GB boundary need to be shadowed in low memory. */ -#define l3tab_needs_shadow(mfn) (mfn >= 0x100000) +#define l3tab_needs_shadow(mfn) ((mfn) >= 0x100000) #else /* * In debug builds we aggressively shadow PDPTs to exercise code paths. @@ -278,9 +278,9 @@ void share_xen_page_with_privileged_guests( * (detected by lack of an owning domain). Always shadow PDPTs above 4GB. */ #define l3tab_needs_shadow(mfn) \ - ((((mfn << PAGE_SHIFT) != __pa(idle_pg_table)) && \ + (((((mfn) << PAGE_SHIFT) != __pa(idle_pg_table)) && \ (page_get_owner(mfn_to_page(mfn)) != NULL)) || \ - (mfn >= 0x100000)) + ((mfn) >= 0x100000)) #endif static l1_pgentry_t *fix_pae_highmem_pl1e; -- 2.30.2